package cn.xq.pethome.dept.domain;

import cn.xq.pethome.base.domain.BaseDomain;
import cn.xq.pethome.employee.domain.Employee;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Department extends BaseDomain {

    @ApiParam(name="部门属性",required = true)
    private String sn;
    @ApiParam(name="部门属性",required = true)
    private String name;

    @ApiParam(name="上级",required = true)
    private String dirPath;

    @ApiParam(name="是否启用属性",required = true)
    private Integer state;
    @ApiParam(name="管理人ID属性",required = true)
    private Long manager_id;
    @ApiParam(name="父类ID属性",required = true)
    private Long parent_id;
    @ApiParam(name="商店ID属性",required = true)
    private Long shop_id;

    private Employee manager;
    private Department parent;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children= new ArrayList<>();
}
